<!DOCTYPE html	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:sdu="http://sduept.com/jsf/cc">
<h:head>
	<link href="/css/primefaces/menubase.css" rel="stylesheet"
		type="text/css" />
	<title>添加评价厂站</title>
	<style type="text/css">
		.value {
			font-weight: bold;
		}
		
		.ui-tree {
			width: 100%;
			position: relative;
			height: 550px;
			overflow-y: scroll;
		}
		
		.ui-panelgrid .ui-panelgrid-cell {
			border-width: 0px;
		}
		
		.ui-widget-header .ui-inputfield, .ui-widget-content .ui-inputfield {
			font-weight: normal;
			width: 30px;
		}
		
		.expertSelectorTitle {
			color: #555;
			/* background-color: #fff; */
			font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
				sans-serif;
			font-weight: 600;
			font-size: 16px;
			padding: 10px 15px;
			line-height: 1.42857143;
		}
		
		.ui-g-6 {
			border: 1px solid #d5d5d5;
			border-radius: 3px;
			width: 49.5%;
		}
		
		.ui-g-12 {
			border: 1px solid #d5d5d5;
			border-radius: 3px;
		}
	</style>
	<script>
		/*关闭该弹窗并返回数据*/
		function closeAndSave(data) {
			//将对象转为JSON字符串
			data = JSON.stringify(data);
			/* alert(data); */
			var index = parent.layer.getFrameIndex(window.name);
			if (parent.dialogReturn) {
				parent.dialogReturn(index, data);
			}
			parent.layer.close(index);
		}
	</script>
</h:head>

<h:body>
	<h:form id="instationSelectorForm" style="font-size:14px">
	
		<p:toolbar id="stationtoolbar">
			<f:facet name="left">
				<h:outputText value="电压等级:" style="margin-right:10px" />
				<h:selectOneMenu
					value="#{inspectionStationSelectorController2.selectedVol}"
					style="width:90px;height:31px;">
					<p:ajax event="change"
						listener="#{inspectionStationSelectorController2.changeVoltage}"
						update="stationTree" />
					<f:selectItem itemLabel="全部" itemValue="0" />
					<f:selectItem itemLabel="220kV" itemValue="220" />
					<f:selectItem itemLabel="500kV" itemValue="500" />
					<f:selectItem itemLabel="800kV" itemValue="800" />
				</h:selectOneMenu>
			</f:facet>
			<f:facet name="right">
				<p:commandButton value="确定" icon="fa fa-hdd-o"
					actionListener="#{inspectionStationSelectorController2.saveAndClose()}">
					<!-- <p:confirm header="提示" message="确定保存吗？" icon="ui-icon-alert" /> -->
				</p:commandButton>
			</f:facet>
		</p:toolbar>
		<p:tree id="stationTree" widgetVar="stationTree" dynamic="true"
			animate="true" var="node" style="border:0"
			value="#{inspectionStationSelectorController2.stationRoot}"
			selectionMode="checkbox"
			selection="#{inspectionStationSelectorController2.selectedSubStationNodes}">
			<!-- <p:ajax event="select"
				listener="#{inspectionStationSelectorController2.onStationNodeSelect}" />
			<p:ajax event="unselect"
				listener="#{inspectionStationSelectorController2.onStationNodeUnSelect}" /> -->
			<p:treeNode type="root" icon="fa fa-home">
				<h:outputText value="#{node}" />
			</p:treeNode>
			<p:treeNode type="maintenanceUnit" icon="fa fa-home">
				<h:outputText value="#{node}" />
			</p:treeNode>
			<p:treeNode type="station">
				<h:outputText value="#{node}" />
			</p:treeNode>
		</p:tree>

	</h:form>
</h:body>
</html>
